package com.commerceE.domain;

import java.util.Date;
import java.util.List;

public class Products implements java.io.Serializable{
    /**
	 * 
	 */
	private static final long serialVersionUID = -8350694928209054299L;


	private Long productId;
    

    private String productName;
    
    private String productDescription;
    
    private String briefDescription;
    
    private String categoryId;
    
    private Category category;

    private Integer displayOrder;

    private Boolean globalpriceFlag;

    private Double globalprice;

    private Date activeStartTime;

    private Date activeEndTime;
    
    private Boolean isMan;
    
    private Boolean discountFlag;
    
    private Double discountPrice;
    
    private Images smallImage;
    
    private Images bestBuyImage;
    
    private List<Images> regularImagelist;
    
    private String url;
    
    private String gender;
    
    private String collarType;
    
    private List<Product_instance> productInstanceList;
    
    private int totalQuantity;
    
    //search purpose
    private String priceRangeStr;

    private double priceSearchStart;
    
    private double priceSearchEnd;
    
    
    public int getTotalQuantity() {
		return totalQuantity;
	}

	public void setTotalQuantityl(int totalQuantity) {
		this.totalQuantity = totalQuantity;
	}

	public List<Product_instance> getProductInstanceList() {
		return productInstanceList;
	}

	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public String getCollarType() {
		return collarType;
	}

	public void setCollarType(String collarType) {
		this.collarType = collarType;
	}

	public void setTotalQuantity(int totalQuantity) {
		this.totalQuantity = totalQuantity;
	}

	public void setProductInstanceList(List<Product_instance> productInstanceList) {
		this.productInstanceList = productInstanceList;
	}

	public String getPriceRangeStr() {
		return priceRangeStr;
	}

	public void setPriceRangeStr(String priceRangeStr) {
		this.priceRangeStr = priceRangeStr;
	}

	public double getPriceSearchStart() {
		return priceSearchStart;
	}

	public void setPriceSearchStart(double priceSearchStart) {
		this.priceSearchStart = priceSearchStart;
	}

	public double getPriceSearchEnd() {
		return priceSearchEnd;
	}

	public void setPriceSearchEnd(double priceSearchEnd) {
		this.priceSearchEnd = priceSearchEnd;
	}

	public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName == null ? null : productName.trim();
    }

    public Integer getDisplayOrder() {
        return displayOrder;
    }

    public void setDisplayOrder(Integer displayOrder) {
        this.displayOrder = displayOrder;
    }

    public Boolean getGlobalpriceFlag() {
        return globalpriceFlag;
    }

    public void setGlobalpriceFlag(Boolean globalpriceFlag) {
        this.globalpriceFlag = globalpriceFlag;
    }

    public Double getGlobalprice() {
        return globalprice;
    }
    public void setGlobalprice(Double globalprice) {
        this.globalprice = globalprice;
    }

    public Date getActiveStartTime() {
        return activeStartTime;
    }

    public void setActiveStartTime(Date activeStartTime) {
        this.activeStartTime = activeStartTime;
    }

    public Date getActiveEndTime() {
        return activeEndTime;
    }

    public void setActiveEndTime(Date activeEndTime) {
        this.activeEndTime = activeEndTime;
    }

	public Boolean getIsMan() {
		return isMan;
	}

	public void setIsMan(Boolean isMan) {
		this.isMan = isMan;
	}

	public Boolean getDiscountFlag() {
		return discountFlag;
	}

	public void setDiscountFlag(Boolean discountFlag) {
		this.discountFlag = discountFlag;
	}

	public Double getDiscountPrice() {
		return discountPrice;
	}

	public void setDiscountPrice(Double discountPrice) {
		this.discountPrice = discountPrice;
	}

	public String getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(String categoryId) {
		this.categoryId = categoryId;
	}

	public Images getSmallImage() {
		return smallImage;
	}

	public void setSmallImage(Images smallImage) {
		this.smallImage = smallImage;
	}

	public Images getBestBuyImage() {
		return bestBuyImage;
	}

	public void setBestBuyImage(Images bestBuyImage) {
		this.bestBuyImage = bestBuyImage;
	}

	public List<Images> getRegularImagelist() {
		return regularImagelist;
	}

	public void setRegularImagelist(List<Images> regularImagelist) {
		this.regularImagelist = regularImagelist;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getProductDescription() {
		return productDescription;
	}

	public void setProductDescription(String productDescription) {
		this.productDescription = productDescription;
	}

	public String getBriefDescription() {
		if(productDescription==null){
			return "";
		}else{
			if(productDescription.length()>200){
				return productDescription.substring(0,200)+".....";
			}else{
				return productDescription;
			}
		}
	}

	public void setBriefDescription(String briefDescription) {
		this.briefDescription = briefDescription;
	}
    
    
}